using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using System.Configuration;
using QuanLyThietBi.Config;     
using QuanLyThietBi.Entity;
namespace QuanLyThietBi.ManagerBase
{
                

     public abstract class TBL_LoaiThietBiManagerBase
    {
        public TBL_LoaiThietBiManagerBase()
        {
            Adapter.ConnectionString =  ConnectionConfig.ConnectionString;            
        }
                    
 
        /// <summary>
        /// Them moi du lieu
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity Insert(TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity) Adapter.Insert(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo khoa chinh cua object
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity Update(TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.Update(obj);             
        }
 
 
        /// <summary>
        /// Update du lieu theo dieu kien trong object
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity UpdateWithCondition(TBL_LoaiThietBiEntity obj,TBL_LoaiThietBiEntity objCond)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.UpdateWithCondition(obj,objCond);             
        }
 
 
        public TBL_LoaiThietBiEntity Delete(TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.Delete(obj);             
        }
 
 
        public TBL_LoaiThietBiEntity DeleteWithCondition(TBL_LoaiThietBiEntity objCond)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.DeleteWithCondition(objCond);             
        }
 


        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByMaLoaiTB (TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"MaLoaiTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MaLoaiTB 
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByMaLoaiTB (string MaLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MaLoaiTB = MaLoaiTB;  
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"MaLoaiTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByMoTa (TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"MoTa");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien MoTa 
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByMoTa (string MoTa )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MoTa = MoTa;  
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"MoTa");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByTenLoaiTB (TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"TenLoaiTB");
        }

        /// <summary>
        /// Xoa cac dong du lieu thoa dieu kien TenLoaiTB 
        /// </summary>
        /// <returns>TBL_LoaiThietBiEntity</returns>
        public TBL_LoaiThietBiEntity DeleteByTenLoaiTB (string TenLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.TenLoaiTB = TenLoaiTB;  
            return (TBL_LoaiThietBiEntity)Adapter.DeleteByField(obj,"TenLoaiTB");
        }

 
        /// <summary>
        /// Lay du lieu theo khoa chinh object
        /// </summary>
        /// <returns></returns>
        public TBL_LoaiThietBiEntity Select(TBL_LoaiThietBiEntity obj)
        { 
            return (TBL_LoaiThietBiEntity) Adapter.Select(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_LoaiThietBiEntity obj)
        { 
            return  Adapter.SelectWithCondition(obj);             
        }
 
 
        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns></returns>
        public DataTable SelectWithCondition(TBL_LoaiThietBiEntity obj,SelectOptions option)
        {             
            return  Adapter.SelectWithCondition(obj,option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll()
        { 
            return Adapter.SelectAll(new TBL_LoaiThietBiEntity());             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public DataTable SelectAll(SelectOptions option)
        { 
            return Adapter.SelectAll(new TBL_LoaiThietBiEntity(),option);             
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_LoaiThietBiEntity> SelectAllLST()
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_LoaiThietBiEntity()),new TBL_LoaiThietBiEntity());           
        }
 
 
        /// <summary>
        /// Lay tat ca cac du lieu trong table
        /// </summary>
        /// <returns></returns>
        public List<TBL_LoaiThietBiEntity> SelectAllLST(SelectOptions option)
        { 
            return (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectAll(new TBL_LoaiThietBiEntity(),option),new TBL_LoaiThietBiEntity());             
        }
 

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaLoaiTB (TBL_LoaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"MaLoaiTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaLoaiTB (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MaLoaiTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByMaLoaiTBLST (TBL_LoaiThietBiEntity obj)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaLoaiTB"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByMaLoaiTBLST (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MaLoaiTB",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaLoaiTB (string MaLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MaLoaiTB = MaLoaiTB;  
            return Adapter.SelectByField(obj,"MaLoaiTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMaLoaiTB (string MaLoaiTB, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MaLoaiTB = MaLoaiTB;  
            return Adapter.SelectByField(obj,"MaLoaiTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByMaLoaiTBLST (string MaLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MaLoaiTB = MaLoaiTB;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaLoaiTB"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MaLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByMaLoaiTBLST (string MaLoaiTB, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MaLoaiTB = MaLoaiTB;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MaLoaiTB",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMoTa (TBL_LoaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"MoTa");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMoTa (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"MoTa",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByMoTaLST (TBL_LoaiThietBiEntity obj)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MoTa"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByMoTaLST (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"MoTa",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMoTa (string MoTa )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MoTa = MoTa;  
            return Adapter.SelectByField(obj,"MoTa");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByMoTa (string MoTa, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MoTa = MoTa;  
            return Adapter.SelectByField(obj,"MoTa",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByMoTaLST (string MoTa )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MoTa = MoTa;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MoTa"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien MoTa duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByMoTaLST (string MoTa, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.MoTa = MoTa;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"MoTa",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenLoaiTB (TBL_LoaiThietBiEntity obj)
        { 
            return Adapter.SelectByField(obj,"TenLoaiTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenLoaiTB (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return Adapter.SelectByField(obj,"TenLoaiTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByTenLoaiTBLST (TBL_LoaiThietBiEntity obj)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenLoaiTB"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectByTenLoaiTBLST (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectByField(obj,"TenLoaiTB",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenLoaiTB (string TenLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.TenLoaiTB = TenLoaiTB;  
            return Adapter.SelectByField(obj,"TenLoaiTB");
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public DataTable SelectByTenLoaiTB (string TenLoaiTB, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.TenLoaiTB = TenLoaiTB;  
            return Adapter.SelectByField(obj,"TenLoaiTB",option);
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB 
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByTenLoaiTBLST (string TenLoaiTB )
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.TenLoaiTB = TenLoaiTB;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenLoaiTB"),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien TenLoaiTB duoc set trong object
        /// </summary>
        /// <returns>DataTable</returns>
        public List<TBL_LoaiThietBiEntity> SelectByTenLoaiTBLST (string TenLoaiTB, SelectOptions option)
        { 
            TBL_LoaiThietBiEntity obj = new TBL_LoaiThietBiEntity();
            obj.TenLoaiTB = TenLoaiTB;  
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList(Adapter.SelectByField(obj,"TenLoaiTB",option),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectWithConditionLST (TBL_LoaiThietBiEntity obj)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj),new TBL_LoaiThietBiEntity());
        }

        /// <summary>
        /// Lay du lieu theo cac dieu kien duoc set trong object
        /// </summary>
        /// <returns>List<TBL_LoaiThietBiEntity></returns>
        public List<TBL_LoaiThietBiEntity> SelectWithConditionLST (TBL_LoaiThietBiEntity obj,SelectOptions option)
        { 
            return  (List<TBL_LoaiThietBiEntity>) EntityUtil.CopyDataTableToEntityList( Adapter.SelectWithCondition(obj,option),new TBL_LoaiThietBiEntity());
        }

}
}
